@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">用户管理</a>
        </div>
        <!-- cur-position end -->

        <!--二级目录-->
        @include('admin.common.user-header')

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户手机</th>
                    <th>头像</th>
                    <th>真实姓名</th>
                    <th>昵称</th>
                    <th>性别</th>
                    <th>出生日期</th>
                    <th>个人认证情况</th>
                    <th>企业认证情况</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="fansinfo">
                @if(count($users) > 0)
                    @foreach($users as $user)
                        <tr>
                            <td>{{$user->id}}</td>
                            <td>{{$user->phone}}</td>
                            <td class="account-td" style="width: 20px;">
                                <span class="photo">
                                    <img src="{{$user->photo_url}}" alt="">
                                </span>
                            </td>
                            <td>{{$user->realname}}</td>
                            <td>
                                <div class="info-box">
                                    <p>
                                        <span class="icon icon-rzh"></span>
                                        <span class="name">{{$user->nickname}}</span>
                                    </p>
                                </div>
                            </td>
                            <td>
                                @if($user->sex == 0)
                                    保密
                                @elseif($user->sex == 1)
                                    男
                                @elseif($user->sex == 2)
                                    女
                                @endif
                            </td>
                            <td>{{$user->birth}}</td>
                            <td>
                                @if($user->personal_auth == 0)
                                    未认证
                                @elseif($user->personal_auth == 2)
                                    <p style="color:orange;">认证中</p>
                                @elseif($user->personal_auth == 1)
                                    <p style="color:green;">已认证</p>
                                @elseif($user->personal_auth == 3)
                                    <p style="color:red;">认证失败</p>
                                @endif
                            </td>
                            <td>
                                @if($user->company_auth == 0)
                                    未认证
                                @elseif($user->personal_auth == 2)
                                    <p style="color:orange;">认证中</p>
                                @elseif($user->personal_auth == 1)
                                    <p style="color:green;">已认证</p>
                                @elseif($user->personal_auth == 3)
                                    <p style="color:red;">认证失败</p>
                                @endif
                            </td>
                            <td>{{$user->created_at}}</td>
                            <td><a href="{{route('Admin.Home.userListDetail')}}?id={{$user->id}}" target="_blank">查看详情</a></td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
            <?php echo $users->render(); ?>
        </div>
    </div>
    <!-- content end -->

@endsection